<template>
  <section>
    <span>{{ maybeProvince }}{{ maybeCity }}{{ maybeDistrict }}{{ maybeAddress }}</span>
  </section>
</template>

<script>
export default {
  name: "Address",
  props: {
    province: {
      type: String
    },
    city: {
      type: String
    },
    district: {
      type: String
    },
    address: {
      type: String
    },
    row: Object,
  },
  computed: {
    maybeProvince () {
      return this.row?.province || this.province;
    },
    maybeCity () {
      return this.row?.city || this.city;
    },
    maybeDistrict () {
      return this.row?.district || this.district;
    },
    maybeAddress () {
      return this.row?.address || this.address;
    }
  },
};
</script>
